<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script>

    // axios.get('http://120.48.109.174:8081/area/hot')
    //     .then(function (response) {
    //         console.log(response);
    //     })
    //     .catch(function (error) {
    //         console.log(error);
    //     });

    //异步代码同步化
    axios.defaults.baseURL="http://39.104.16.173:8081/";
    
    async function getHot(){

        let city = await axios.get('/area/hot');

        let id = city.data.body[0].value;

        let area = await axios.get("/area?id="+id);

        return area;
    }
    let pm = getHot();
    pm.then(res=>{
        console.log(res);
    })


</script>

</html>